import service from '@/utils/request'

const BASE_URL = 'api-order'

//课程结算列表
export function settlementCourseList(data) {
    return service({
        url: `${BASE_URL}/order/course/settlements`,
        method: 'get',
        params: data
    })
}

//课程结算班级列表
export function settlementCourseClassList(data) {
    return service({
        url: `${BASE_URL}/order/course/settlement/class`,
        method: 'get',
        params: data
    })
}

//课程订单结算状态修改
export function updateCourseSettlementStatus(settlementId, settlementStatus) {
    return service({
        url: `${BASE_URL}/order/course/settlement/${settlementId}/${settlementStatus}`,
        method: 'put'
    })
}

//教具结算列表
export function settlementMaterialList(data) {
    return service({
        url: `${BASE_URL}/order/material/settlements`,
        method: 'get',
        params: data
    })
}

//教具订单结算详情
export function settlementMaterialDetail(settlementId) {
    return service({
        url: `${BASE_URL}/order/material/settlement/${settlementId}`,
        method: 'get'
    })
}

//教具订单状结算态修改
export function updateMaterialSettlementStatus(settlementId, settlementStatus) {
    return service({
        url: `${BASE_URL}/order/material/settlement/${settlementId}/${settlementStatus}`,
        method: 'put'
    })
}

//获取结算转账信息
export function settlementTransferDetail(settlementId) {
    return service({
        url: `${BASE_URL}/order/transfer/${settlementId}`,
        method: 'get'
    })
}

//保存结算转账信息
export function settlementTransferSave(data) {
    return service({
        url: `${BASE_URL}/order/transfer`,
        method: 'post',
        data: data
    })
}